package classloader;

/**
 * 类加载器 demo3
 *
 * @author dingwen
 * @date 2021/08/29
 */
public class ClassLoaderDemo3 {
    public static void main(String[] args) {
        ClassLoader classLoader = ClassLoaderDemo3.class.getClassLoader();

        // classLoader = sun.misc.Launcher$AppClassLoader@18b4aac2
        System.out.println("classLoader = " + classLoader);


        //classLoader = sun.misc.Launcher$AppClassLoader@18b4aac2
        //classLoader = sun.misc.Launcher$ExtClassLoader@4554617c
        //
        while (classLoader != null){
            System.out.println("classLoader = " + classLoader);
            classLoader = classLoader.getParent();
        }

    }
}
